package net.hn.hnms.biz.sewage.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

/**
 * @author 智呈物联 nzw
 * @date 2022/9/22
 */
@Entity
@Table(name = "sewage_Index", schema = "wscl", catalog = "huaneng-safety")
public class SewageIndexEntity {
    private Long id;
    private Date fillInTime;
    private String describe;
    private String staffOnDuty;
    private String remark;
    private String sewageType;
    private String mineCode;
    private String staffOnDutyCode;
    private String state;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "custom-id")
    @GenericGenerator(name = "custom-id", strategy = "net.hn.hnms.biz.sewage.util.CustomIDGenerator")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "fill_in_time")
    public Date getFillInTime() {
        return fillInTime;
    }

    public void setFillInTime(Date fillInTime) {
        this.fillInTime = fillInTime;
    }

    @Basic
    @Column(name = "describe")
    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    @Basic
    @Column(name = "staff_on_duty")
    public String getStaffOnDuty() {
        return staffOnDuty;
    }

    public void setStaffOnDuty(String staffOnDuty) {
        this.staffOnDuty = staffOnDuty;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "sewage_type")
    public String getSewageType() {
        return sewageType;
    }

    public void setSewageType(String sewageType) {
        this.sewageType = sewageType;
    }

    @Basic
    @Column(name = "mine_code")
    public String getMineCode() {
        return mineCode;
    }

    public void setMineCode(String mineCode) {
        this.mineCode = mineCode;
    }

    @Basic
    @Column(name = "staff_on_duty_code")
    public String getStaffOnDutyCode() {
        return staffOnDutyCode;
    }

    public void setStaffOnDutyCode(String personOnDutyCode) {
        this.staffOnDutyCode = personOnDutyCode;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SewageIndexEntity that = (SewageIndexEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(fillInTime, that.fillInTime) &&
                Objects.equals(describe, that.describe) &&
                Objects.equals(staffOnDuty, that.staffOnDuty) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(sewageType, that.sewageType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, fillInTime, describe, staffOnDuty, remark, sewageType);
    }
}
